3.2470 \(\int \frac {(a+b x^n)^3}{x^2} \, dx\)

Optimal. Leaf size=66 \[ -\frac {a^3}{x}-\frac {3 a^2 b x^{n-1}}{1-n}-\frac {3 a b^2 x^{2 n-1}}{1-2 n}-\frac {b^3 x^{3 n-1}}{1-3 n} \]

[Out]

-a^3/x-3*a^2*b*x^(-1+n)/(1-n)-3*a*b^2*x^(-1+2*n)/(1-2*n)-b^3*x^(-1+3*n)/(1-3*n)

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 66, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {270} \[ -\frac {3 a^2 b x^{n-1}}{1-n}-\frac {a^3}{x}-\frac {3 a b^2 x^{2 n-1}}{1-2 n}-\frac {b^3 x^{3 n-1}}{1-3 n} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*x^n)^3/x^2,x]

[Out]

-(a^3/x) - (3*a^2*b*x^(-1 + n))/(1 - n) - (3*a*b^2*x^(-1 + 2*n))/(1 - 2*n) - (b^3*x^(-1 + 3*n))/(1 - 3*n)

Rule 270

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rubi steps

\begin {align*} \int \frac {\left (a+b x^n\right )^3}{x^2} \, dx &=\int \left (\frac {a^3}{x^2}+3 a^2 b x^{-2+n}+3 a b^2 x^{2 (-1+n)}+b^3 x^{-2+3 n}\right ) \, dx\\ &=-\frac {a^3}{x}-\frac {3 a^2 b x^{-1+n}}{1-n}-\frac {3 a b^2 x^{-1+2 n}}{1-2 n}-\frac {b^3 x^{-1+3 n}}{1-3 n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 58, normalized size = 0.88 \[ \frac {-a^3+\frac {3 a^2 b x^n}{n-1}+\frac {3 a b^2 x^{2 n}}{2 n-1}+\frac {b^3 x^{3 n}}{3 n-1}}{x} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*x^n)^3/x^2,x]

[Out]

(-a^3 + (3*a^2*b*x^n)/(-1 + n) + (3*a*b^2*x^(2*n))/(-1 + 2*n) + (b^3*x^(3*n))/(-1 + 3*n))/x

________________________________________________________________________________________

fricas [B]  time = 1.06, size = 131, normalized size = 1.98 \[ -\frac {6 \, a^{3} n^{3} - 11 \, a^{3} n^{2} + 6 \, a^{3} n - a^{3} - {\left (2 \, b^{3} n^{2} - 3 \, b^{3} n + b^{3}\right )} x^{3 \, n} - 3 \, {\left (3 \, a b^{2} n^{2} - 4 \, a b^{2} n + a b^{2}\right )} x^{2 \, n} - 3 \, {\left (6 \, a^{2} b n^{2} - 5 \, a^{2} b n + a^{2} b\right )} x^{n}}{{\left (6 \, n^{3} - 11 \, n^{2} + 6 \, n - 1\right )} x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x^n)^3/x^2,x, algorithm="fricas")

[Out]

-(6*a^3*n^3 - 11*a^3*n^2 + 6*a^3*n - a^3 - (2*b^3*n^2 - 3*b^3*n + b^3)*x^(3*n) - 3*(3*a*b^2*n^2 - 4*a*b^2*n +
a*b^2)*x^(2*n) - 3*(6*a^2*b*n^2 - 5*a^2*b*n + a^2*b)*x^n)/((6*n^3 - 11*n^2 + 6*n - 1)*x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (b x^{n} + a\right )}^{3}}{x^{2}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x^n)^3/x^2,x, algorithm="giac")

[Out]

integrate((b*x^n + a)^3/x^2, x)

________________________________________________________________________________________

maple [A]  time = 0.02, size = 65, normalized size = 0.98 \[ \frac {\frac {3 a^{2} b \,{\mathrm e}^{n \ln \relax (x )}}{n -1}+\frac {3 a \,b^{2} {\mathrm e}^{2 n \ln \relax (x )}}{2 n -1}+\frac {b^{3} {\mathrm e}^{3 n \ln \relax (x )}}{3 n -1}-a^{3}}{x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*x^n)^3/x^2,x)

[Out]

(b^3/(-1+3*n)*exp(n*ln(x))^3-a^3+3*a*b^2/(2*n-1)*exp(n*ln(x))^2+3*a^2*b/(n-1)*exp(n*ln(x)))/x

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x^n)^3/x^2,x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(n-2>0)', see `assume?` for mor
e details)Is n-2 equal to -1?

________________________________________________________________________________________

mupad [B]  time = 1.17, size = 66, normalized size = 1.00 \[ \frac {b^3\,x^{3\,n}}{x\,\left (3\,n-1\right )}-\frac {a^3}{x}+\frac {3\,a\,b^2\,x^{2\,n}}{x\,\left (2\,n-1\right )}+\frac {3\,a^2\,b\,x^n}{x\,\left (n-1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*x^n)^3/x^2,x)

[Out]

(b^3*x^(3*n))/(x*(3*n - 1)) - a^3/x + (3*a*b^2*x^(2*n))/(x*(2*n - 1)) + (3*a^2*b*x^n)/(x*(n - 1))

________________________________________________________________________________________

sympy [A]  time = 1.29, size = 508, normalized size = 7.70 \[ \begin {cases} - \frac {a^{3}}{x} - \frac {9 a^{2} b}{2 x^{\frac {2}{3}}} - \frac {9 a b^{2}}{\sqrt [3]{x}} + b^{3} \log {\relax (x )} & \text {for}\: n = \frac {1}{3} \\- \frac {a^{3}}{x} - \frac {6 a^{2} b}{\sqrt {x}} + 3 a b^{2} \log {\relax (x )} + 2 b^{3} \sqrt {x} & \text {for}\: n = \frac {1}{2} \\- \frac {a^{3}}{x} + 3 a^{2} b \log {\relax (x )} + 3 a b^{2} x + \frac {b^{3} x^{2}}{2} & \text {for}\: n = 1 \\- \frac {6 a^{3} n^{3}}{6 n^{3} x - 11 n^{2} x + 6 n x - x} + \frac {11 a^{3} n^{2}}{6 n^{3} x - 11 n^{2} x + 6 n x - x} - \frac {6 a^{3} n}{6 n^{3} x - 11 n^{2} x + 6 n x - x} + \frac {a^{3}}{6 n^{3} x - 11 n^{2} x + 6 n x - x} + \frac {18 a^{2} b n^{2} x^{n}}{6 n^{3} x - 11 n^{2} x + 6 n x - x} - \frac {15 a^{2} b n x^{n}}{6 n^{3} x - 11 n^{2} x + 6 n x - x} + \frac {3 a^{2} b x^{n}}{6 n^{3} x - 11 n^{2} x + 6 n x - x} + \frac {9 a b^{2} n^{2} x^{2 n}}{6 n^{3} x - 11 n^{2} x + 6 n x - x} - \frac {12 a b^{2} n x^{2 n}}{6 n^{3} x - 11 n^{2} x + 6 n x - x} + \frac {3 a b^{2} x^{2 n}}{6 n^{3} x - 11 n^{2} x + 6 n x - x} + \frac {2 b^{3} n^{2} x^{3 n}}{6 n^{3} x - 11 n^{2} x + 6 n x - x} - \frac {3 b^{3} n x^{3 n}}{6 n^{3} x - 11 n^{2} x + 6 n x - x} + \frac {b^{3} x^{3 n}}{6 n^{3} x - 11 n^{2} x + 6 n x - x} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x**n)**3/x**2,x)

[Out]

Piecewise((-a**3/x - 9*a**2*b/(2*x**(2/3)) - 9*a*b**2/x**(1/3) + b**3*log(x), Eq(n, 1/3)), (-a**3/x - 6*a**2*b
/sqrt(x) + 3*a*b**2*log(x) + 2*b**3*sqrt(x), Eq(n, 1/2)), (-a**3/x + 3*a**2*b*log(x) + 3*a*b**2*x + b**3*x**2/
2, Eq(n, 1)), (-6*a**3*n**3/(6*n**3*x - 11*n**2*x + 6*n*x - x) + 11*a**3*n**2/(6*n**3*x - 11*n**2*x + 6*n*x -
x) - 6*a**3*n/(6*n**3*x - 11*n**2*x + 6*n*x - x) + a**3/(6*n**3*x - 11*n**2*x + 6*n*x - x) + 18*a**2*b*n**2*x*
*n/(6*n**3*x - 11*n**2*x + 6*n*x - x) - 15*a**2*b*n*x**n/(6*n**3*x - 11*n**2*x + 6*n*x - x) + 3*a**2*b*x**n/(6
*n**3*x - 11*n**2*x + 6*n*x - x) + 9*a*b**2*n**2*x**(2*n)/(6*n**3*x - 11*n**2*x + 6*n*x - x) - 12*a*b**2*n*x**
(2*n)/(6*n**3*x - 11*n**2*x + 6*n*x - x) + 3*a*b**2*x**(2*n)/(6*n**3*x - 11*n**2*x + 6*n*x - x) + 2*b**3*n**2*
x**(3*n)/(6*n**3*x - 11*n**2*x + 6*n*x - x) - 3*b**3*n*x**(3*n)/(6*n**3*x - 11*n**2*x + 6*n*x - x) + b**3*x**(
3*n)/(6*n**3*x - 11*n**2*x + 6*n*x - x), True))

________________________________________________________________________________________